/*
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements.  See the NOTICE file
distributed with this work for additional information
regarding copyright ownership.  The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License.  You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied.  See the License for the
specific language governing permissions and limitations
under the License.
 */
package td.shared;

/**
 * @author Artem Shamsutdinov
 * 
 */
public interface Constants {

	long SESSION_TIMEOUT = 900000;

	interface Control {
		String BUTTON = "BUTTON";
		String LINK = "LINK";
		String CHECK_BOX = "CHECK_BOX";
		String TEXT_BOX = "TEXT_BOX";
		String TEXT = "TEXT";
	}

	interface MAIN {
		String NAME = "Main";

		String PREFIX_HELLO = "Hello ";
		String PREFIX_WELCOME = "Welcome ";

		String HELLO_READER = "Hello Reader!";

		interface ID {
			String BTN_LOGIN_JOIN = "btnMainLoginJoin";
			String BTN_LOOUT = "btnMainLogout";
		}

		interface TEXT {
			String BTN_LOGIN_JOIN = "Login/Join";
			String BTN_LOGOUT = "Logout";
		}
	}

	interface LOGIN {
		String NAME = "Login";

		interface ID {
			String TXT_THINKER_ID = "txtThinkerId";
			String TXT_PASSWORD = "txtPassword";
			String TXT_EMAIL = "txtEmail";
			String CHK_JOIN = "chkJoin";
			String BTN_LOGIN = "btnLogin";
			String BTN_JOIN = "btnJoin";
			String LBL_ERROR_MESSAGE = "lblErrorMessage";
		}

		interface TEXT {
			String TXT_THINKER_ID = "Thinker ID:";
			String TXT_PASSWORD = "Password:";
			String TXT_EMAIL = "E-Mail:";
			String CHK_JOIN = "Join!";
			String BTN_LOGIN = "Login";
			String BTN_JOIN = "Join";
		}
	}

	interface MSG {
		String PASSWORD_DESC = "Password must be between 8 and 64 characters in length and contain 1 number, 1 lower case and 1 upper case characer.  Can contain only numbers and characters.";
		String EMAIL_ALREADY_REGISTERED = "This e-mail is already registered";
		String THINKER_ID_ALREADY_TAKEN = "This Thinker ID is already taken";
		String UNABLE_TO_LOGIN = "Unable to login";
		String ACTION_PROTECTED_MUST_HAVE_CREDENTIALS = "You must login to execute this operation.";
		String UNABLE_TO_EXECUTE_PROTECTED_ACTION = "Unable to execute protected action";
		String SESSION_TIMED_OUT = "Session timed out, please re-login";
		String UNABLE_TO_EXECUTE_UNPROTECTED_ACTION = "Unable to execute unprotected action";
		String THOUGHT_NOT_FOUND = "Thought not found";
		String THINKER_NOT_FOUND = "Thinker not found";
		String THINKER_NOT_OWNER_OF_THOUGHT = "Thinker is not the owner of this thought";
	}

	String TD_XSRF_SECURITY_COOKIE = "TD_XSRF_SECURITY_COOKIE";

	String EMPTY = "";
	String PASSWORD_PATTERN = "((?=.*\\d)(?=.*[a-z])(?=.*[A-Z]).{8,64})";
}
